#include <QtGui>
#include "LoginWindow.h"
#include <iostream>


LoginWindow::LoginWindow(QWidget *parent) :
     QDialog(parent)
{
    setupUi(this);

    portLine->setValidator(new QIntValidator(1, 65535, this));

    connect(connectButton, SIGNAL(clicked()), this, SLOT(connectToHost()));
    connect(cancelButton,  SIGNAL(clicked()), this, SLOT(close()));

}


void LoginWindow::connectToHost()
{
        emit connectToHost(IPLine->text(), portLine->text().toInt(), loginLine->text());
        close();
}
